home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12370 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.3 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Questions on Object-Oriented Programming?
  5. Date: 31 Mar 1996 10:14:43 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4jmi2jINN7c0@keats.ugrad.cs.ubc.ca>
  8. References: <315d97ad.4471232@shts.seed.net.tw>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <315d97ad.4471232@shts.seed.net.tw>,
  12. Jason Lam <lamj@icacomp.com> wrote:
  13. >Hello!!
  14. >
  15. >I got the following questions on Object Oriented Programming:
  16. >
  17. >What is  a 'class' and an 'instance' of an object. Any examples?  
  18. >what is the state and behavior of an object each refer to. 
  19.  
  20. These are abstract concepts. I'm writing (or I _should_ be writing, rather) an
  21. essay in philosophy of science about an object-oriented conception of
  22. scientific theories. Concepts of 'class', 'instance', 'state' and 'behavior'
  23. are attributed to theoretical entities such as 'electron', rather than to
  24. software program entities.
  25.  
  26. Clearly, the ideas extend past programming. An apple is an instance of the
  27. abstract class of apples---that is, sort of a ``physical embodiment'' of the
  28. abstract idea of an apple. I can talk about the properties of objects of the
  29. class of apples without having an instance in my hand. A class is like a
  30. category, and an instance is an actual member of that category.
  31.  
  32. >What is a method? 
  33.  
  34. >What is a 'message' is. Any example? 
  35.  
  36. A way for objects to interact, to tell each other what to do in essence. In
  37. programming, messages are often implemented as function calls to methods within
  38. an object. For example, the flashlight object may have a method called
  39. "turnon", i.e. a built in function that causes the flashlight to come on when I
  40. call it. I can look at it as invoking the method---that portion of the object
  41. that governs specific behavior with respect to turning on the light---or more
  42. abstractly I can look at it as passing the flashlight a message to turn itself
  43. on.
  44.  
  45. The concepts overlap and easly become more muddy the more you think about
  46. them---like the thought processes of an OO programmer or a philosopher alike.
  47. This is a where we discuss straightforward ways of achieving productive
  48. computation in the C language.
  49.  
  50. >What two states can the button object "OPEN" in the Netscape toolbar
  51. >be in?
  52.  
  53. Smells like homework!
  54. -- 
  55.  
  56.